<template>
  <!--拒绝代码管理-->
  <Card class="jjdmgl page-fill" style="height:900px">
    <div class="table-data" style="">
      <v-table :columns="columns1" :data="data1"></v-table>
      <div class="bottom-container">
        <div class="left-bottom-form">
          <v-form inline>
            <v-form-item>
              <v-button size="small" type="primary" @on-click="handleRouteGo(path+'editor?type=0')">新建</v-button>
            </v-form-item>
            <v-form-item>
              <v-select v-model="currentSelect" :select-list="optionsData" @item-click=""></v-select>
            </v-form-item>
            <v-form-item>
              <v-input></v-input>
            </v-form-item>
            <v-form-item>
              <v-button size="small" type="primary" @click="">筛选</v-button>
            </v-form-item>
          </v-form>
        </div>
      </div>
    </div>
    <div class="pagi-box">
      <v-pagination  :total="total2" :current-page="currentPage2"
                     :page-size="pageSize2"
                     @on-page-change="handlePageChange2">
      </v-pagination>
    </div>
  </Card>
</template>

<script>
  export default {
    data(){
      return {
        gdh: '',
        currentSelect: '',
        path: this.$route.path,
        optionsData: [
          {
            value: '选项1',
            label: '黄金糕'
          }, {
            value: '选项2',
            label: '双皮奶',
          }, {
            value: '选项3',
            label: '蚵仔煎'
          }, {
            value: '选项4',
            label: '龙须面'
          }, {
            value: '选项5',
            label: '北京烤鸭'
          }
        ],
        columns1: [
          {
            title: '拒绝代码',
            key: 'jjdm'
          },
          {
            title: '名称',
            key: 'mc'
          },
          {
            title: '优先级',
            key: 'yxj'
          },
          {
            title: '最后更新时间',
            key: 'zhgxsj'
          },
          {
            title: '操作',
            render: function ( h ) {
              const vm = this;
              return h( 'div', {}, [
                h( 'v-button', {
                  props: {
                    type: 'text'
                  },
                  style: {
                    fontSize: '12px'
                  },
                  on: {
                    'on-click'(){
                      vm.$router.push( vm.path + 'editor' );
                    }
                  }
                }, '查看' ),
                h( 'v-button', {
                  props: {
                    type: 'text'
                  },
                  style: {
                    fontSize: '12px',
                    marginLeft: '5px'
                  },
                  on: {
                    'on-click'(){
                      vm.$router.push( vm.path + 'editor?type=1' );
                    }
                  }
                }, ' 编辑' ),
                h( 'v-button', {
                  props: {
                    type: 'text'
                  },
                  style: {
                    fontSize: '12px',
                    marginLeft: '5px'
                  }
                }, ' 删除' ),
              ] );
            }.bind( this )
          },
        ],
        data1: [
          {
            id: '1232323',
            khxm: 'hello',
          }
        ],
        total2: 1200,
        currentPage2: 1,
        pageSize2: 20,
      }
    },
    methods: {
      handlePageChange2( index ){
        this.currentPage2 = index;
      },
      handleRouteGo( pathName ){
        this.$router.push( pathName );
      }
    },
  }
</script>

<style lang="less">
  .jjdmgl {

  }
</style>
